home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
demo
/
for2c10.zip
/
FOR2C.TXT
< prev
next >
Wrap
Text File
|
1995-04-04
|
29KB
|
596 lines
-----------------------------------------------------------------------------
File: for2c.txt
Rev.: 1.0
Date: 10 April 1995
Note: For update, check OmniMedia's archive ("How to Contact the Publisher")
-----------------------------------------------------------------------------
-------------------------
1. Electronic Book Title
-------------------------
FROM FORTRAN TO C
by James F. Kerrigan
(C) Copyright 1995 by James F. Kerrigan
***** An Electronic Book Produced and Published By OmniMedia *****
This Electronic Book is protected by SoftLock. It can be freely
distributed over all electronic networks provided it is not altered
in any manner and all the files are included. See the section
"Copyright Notice and Other Terms" for more specific information.
---------------------
2. Table of Contents
---------------------
This information file is divided into the following sections:
1. Electronic Book Title (presented above)
2. Table of Contents (this section)
3. Introduction
4. Book Abstract
5. About the Author
6. If You Are a Book Reviewer
7. System Requirements
8. Files That Must Be Included in the Distribution Package
9. How to Obtain This Electronic Book (if some of the files are missing)
10. Viewing/Installation Instructions
11. How to Use This Electronic Book and Some Useful Features
12. Copyright Notice and Other Terms (which you should read carefully)
13. How to Contact the Publisher
14. Refund/Warranty Policy
----------------
3. Introduction
----------------
This OmniMedia electronic book is a hypertext conversion, using the
outstanding Microsoft Windows 3.1 Help engine ("WinHelp"), of the book "From
Fortran to C", by James F. Kerrigan.
All Windows 3.1 systems can read this electronic book without any need for
special software other than what is already included with this electronic
book. Although this electronic book is readable at VGA resolution, using a
higher resolution (e.g., 800x600 or 1024x768) is *highly* encouraged.
In addition, this electronic book incorporates SoftLock technology. Using
SoftLock, a portion of this book has been read-locked, requiring the entry of
a password (unique to your computer) to be able to read the locked portion.
However, we have kept a significant portion of this electronic book unlocked
so you can determine whether you want to purchase a password for it. Sort of
a "try before you buy." Since this electronic book is NOT Shareware, you may
freely read and use, without any obligation, the unlocked portions of this
book.
SoftLock makes the purchase of the password very convenient and easy. They
provide an automated 24-hour toll-free number (in the U.S. and Canada) to
take your credit card order. For more complete information about SoftLock
technology as used in this electronic book, read the registration window that
will popup if you select it from the "nag" window that appears when you
attempt to read a locked topic.
The password for "From Fortran to C" sells for $9.95.
Whether or not you decide to purchase a password, do upload this book to your
favorite BBS or public Internet site (read the section "Copyright Notice and
Other Terms" for more specific information on uploading requirements.)
Do give this book a try!
-----------------
4. Book Abstract
-----------------
Experienced programmers struggle with learning a new programming language.
It is frustrating to realize that a task could be done in seconds in the old
programming language but takes minutes or even hours to code in the new
language. This book is written for the experienced Fortran programmer to
learn the ANSI C programming language.
This book is structured as both an introduction and a reference to help the
Fortran-to-C transition. It begins with a brief history of both languages.
It then moves on to elementary comparisons between the two languages (i.e.,
character set, basic statement syntax, data types, operators, and program/
subprogram components). This preliminary information lays the groundwork
for a structured concordance to C for Fortran. Here, a separate section is
presented corresponding to each of the 47 Fortran keywords ASSIGN, BACKSPACE,
BLOCKDATA, ... STOP, SUBROUTINE, WRITE whose C language counterparts are
described and the same working program is given in both Fortran and C. This
concordance is the heart of the book. It is followed by chapters covering
arrays, interprogram communication, input/output to terminals and files, and
C functions that provide capabilities not found in Fortran. Lastly,
appendices provide lists of C compilers, Fortran compilers, Fortran-to-C
translation tools, and standard publications that pertain to Fortran, C and
the transition between the two.
The book is written from a very practical standpoint. Each aspect of the
Fortran programming language is explored and the specific, concrete C
language counterparts are identified. Furthermore, most comparisons are
illustrated by example programs in both Fortran and C.
--------------------
5. About the Author
--------------------
Jim Kerrigan works as a computer consultant. He has been involved with
Fortran in both research and commercial environments for twenty-five years
and with C for over five years. He has used both languages to create
programs ranging from socioeconomic forecasting to data parallel algorithms
and from a project management package through operating system monitors to C
language extensions to aging Fortran packages. Before working for computer
companies (first Prime, then Sequent, now Hewlett-Packard), Jim received a BA
in Archaeology from Temple University and an MA in Regional Science from the
University of Pennsylvania. He is the author of another book, "Migrating to
Fortran 90", published by O'Reilly & Associates.
You can reach Jim Kerrigan through OmniMedia.
------------------------------
6. If You Are a Book Reviewer
------------------------------
The author can acquire voucher numbers which allow SoftLock to give out a
password at no charge to the voucher user. The author will make these
vouchers available to book reviewers. For more information, contact the
author through OmniMedia (see the section "About the Author.") Please do
include your credentials.
-----------------------
7. System Requirements
-----------------------
To view this electronic book, you must have an IBM-compatible PC (386 or
higher is recommended), with color VGA (or better) video resolution. It must
have Microsoft Windows 3.1 installed.
This electronic book has been tested using the common color video resolutions
of VGA, 640x480x256, 800x600x256, and 1024x768x256. For maximum clarity and
readability, it is recommended that you use as high of a video resolution as
your system allows, up to 1024x768x256, or even higher (however, resolutions
higher than 1024x768x256 have not been tested.) For the very high video
resolutions, you should consider using large size fonts if that option is
available to you. Consult your Windows documentation for how to increase your
resolution if that is possible for your particular video card and monitor
combination. (If you feel the font size is too large, read the discussion
about window/font size in the section "How to Use This Electronic Book and
Some Useful Features.")
No guarantee is given that this electronic book, especially the SoftLock
program, will work properly on succeeding versions of Windows (e.g., Windows
95, aka 'Chicago' and 'Windows 4.0'), or with Windows 3.1 emulators (such as
Windows NT or OS/2). Contact OmniMedia for more information about upgrades
for new versions of Windows and possibly other platforms.
All further technical details mentioned in this file are specific to Windows
3.1 installations.
Three final and important notes:
First, this electronic book is written using the Arial TrueType font, which
is part of the normal installation for all Windows 3.1 systems. If you have
removed this font from your system, for whatever reason, the file will not
appear as it was authored (though it may look similar or at least readable.)
It is recommended that you reinstall the Arial TrueType font if you have
removed it from your system (refer to your Windows documentation.)
Second, a very small number of Windows users have experienced some
difficulties in properly reading all of the special text characters for
reasons that are not completely understood, though evidence points to bugs in
a very early release of Windows 3.1 (most Windows users don't have this early
release, if you do, consider upgrading to version 3.11.) The most common
difficulties encountered have been left and right single and double quotes
not being reproduced properly, as well as other characters not being
reproduced properly such as the copyright and trademark symbols, bullets and
em/en-dashes. Do contact OmniMedia if you observe any anomalies regarding
characters and/or fonts that you believe are not due to running an early
release of Windows 3.1.
Third, the background, foreground (text), and hypertext colors have been
hard-coded in this WinHelp format file. If you have color vision
disabilities which make it difficult to read all or part of this electronic
book, contact OmniMedia and special instructions to bypass this color
hard-coding will be sent to you.
-----------------------------------------------------------
8. Files That Must Be Included in the Distribution Package
-----------------------------------------------------------
To properly use this electronic book, the following files must be included in
the distribution package. Omitting one or more of these files may make it
impossible to do one or more of the following actions: 1) register a
password, 2) read the locked portions of the book even with a valid password
installed, 3) use the Full Text Search capability, or 4) use the in-text
buttons.
for2c.hlp -- The WinHelp file of "From Fortran to C"
for2c.ind -- Full Text Search index to "From Fortran to C"
for2c.txt -- This file
read1st.txt -- How to get started
book.ico -- A book icon that can be used for permanent installation
slpw-win.exe -- The SoftLock executable
softlock.exe -- An important SoftLock DOS executable "in case of trouble"
slpwinfo.seq -- The text file for the SoftLock executable
softlock.dll -- A required SoftLock Dynamic Link Library
vbrun300.dll -- (same)
oshtools.dll -- The Dynamic Link Library for OSHTools
ftengine.dll -- A Dynamic Link Library for Full Text Search
ftui.dll -- (same)
mvapi.dll -- (same)
(Note on file 'vbrun300.dll': You may already have this file on your system.
Check in your windows and windows\system directories for it. If you do have
it, check to see if it is the latest version, dated 05-12-93. If it is an
earlier version, you can replace it with the one provided with this
electronic book, though it is wise to backup the previous version "just in
case.")
--------------------------------------
9. How to Obtain This Electronic Book
--------------------------------------
This section will outline three ways by which you can obtain this electronic
book if some or all of the required files are missing or corrupted. The
electronic book will be packaged as a single archive file, most likely a ZIP
file ('for2c.zip' or something similar), which requires a dearchiver to
extract the required files, such as PKUNZIP.
It is probable that other ways to obtain this and other electronic books from
OmniMedia will be implemented in the future. Contact OmniMedia for more
updated information.
(Note: If you will obtain this electronic book in ZIP format (the most
likely archive format), you will need to use an "unzipper." If you
don't have one already, we recommend that you use the authentic DOS
shareware utility called PKZIP (version 2.04g), by PKWARE, Inc.
There also exist several other "clone" unzip utilities (shareware and
freeware) for both DOS and Windows, obtainable from many BBS and
Internet sites. For those of you who have ftp/WWW access, we have
conveniently placed the shareware file 'pkzip204.exe' into our
archive. The ftp address is
ftp.netcom.com /pub/Om/OmniMedia/books/misc
the WWW (Web) URL is
ftp://ftp.netcom.com/pub/Om/OmniMedia/books/misc .)
Here are the three ways you can presently obtain this electronic book:
1) Via Mail Server from OmniMedia's Archive.
It is possible to access OmniMedia's archive via e-mail. This is a good
method for those who have e-mail access to the Internet but don't have
ftp or WWW (Web) access (see number 2 below for information about
OmniMedia's anonymous ftp archive.)
In order to use the mail server, you must have, in addition to an
unzipper (see section "Viewing/Installation Instructions"), a uudecoder,
since the binary ZIP file will be uuencoded into an ASCII format suitable
for e-mail. Most Unix sites have a built-in uudecode utility, but nearly
all other operating systems do not. Obviously, you cannot obtain a
uudecoder for your platform via this e-mail server (since it is a binary
executable), so you have to find one elsewhere, probably by downloading
it from a local BBS (uudecoders for DOS/Windows do exist, but are not
found at all BBS sites.)
For more information on this option, send e-mail to omnimdia@netcom.com
and request the file describing how to access Netcom's ftp mail server.
2) From the Internet Via Anonymous FTP and WWW (World-Wide Web.)
OmniMedia maintains an anonymous ftp archive at
ftp.netcom.com /pub/Om/OmniMedia/books
In order to directly download the files from this archive, you need to
have access to an Internet site with ftp or WWW access.
For anonymous ftp, if you don't know how to use it, consult with someone
who does or study the helpfile or manual at your site. Be sure to type
"binary" before issuing the "get" or "mget" command.
For WWW (or Web) access you can easily download the file 'for2c.zip'
(and other OmniMedia electronic book titles and files) using your browser
(Mosaic is the most commonly used WWW browser.) The URL to the archive is
ftp://ftp.netcom.com/pub/Om/OmniMedia/books
In addition, OmniMedia will attempt to upload this electronic book to
other anonymous ftp archives on the Internet, for example, the CICA
archive (ftp.cica.indiana.edu). You can use archie to try to locate
these other potential sites.
As of the date of this information file, Netcom has been experiencing
some difficulties with its ftp access. OmniMedia is "mirroring" its
books at ftp.awa.com /pub/softlock/pc/products/OmniMedia , so check
there if you can't access Netcom.
3) From Your Local BBS.
There is no doubt that, over time, this electronic book will be
distributed to many BBS and online services around the world. OmniMedia
will attempt to upload this file to Windows On Line, one of the largest
Windows BBS in the world (phone 510-736-8343; it does require a
membership fee for downloading privileges.) And once you obtain this
electronic book, feel free to upload it to your favorite BBS (be sure to
include all the files listed in the section "Files That Must be Included
in the Distribution Package.")
--------------------------------------
10. Viewing/Installation Instructions
--------------------------------------
There are several ways to view, and if desired, install this WinHelp
formatted electronic book on your Windows 3.1 system. Two will be given
below. If you are not very familiar with Windows, it is recommended that you
print out this section for step-by-step instructions. Of course, it is also
recommended that you consult your Windows manual should any questions arise
or these instructions don't work for you. No matter what approach you use to
view this electronic book, you must NOT change the name of the WinHelp file
('for2c.hlp'.) If you do inadvertently change the filename, you won't be
able to unlock the SoftLocked topics, even with a valid password.
Within a few months of this issue of 'for2c.txt' (dated 10 April 1995),
OmniMedia is tentatively planning to implement an easy-to-use installer
oriented towards the novice Windows user. Check with OmniMedia for more
information.
Now, to view this electronic book, following are two ways to do it (it is
assumed that you've already extracted the necessary files from the
distributed archive file, if that's how you obtained this electronic book --
see the section "How to Obtain This Electronic Book"):
*****************************************************************************
1) The Quick and Easy Way -- If you just want to view this electronic book
without permanent installation (e.g., for evaluation purposes), place ALL
the files (the list of necessary files is in the section "Files That Must
Be Included in the Distribution Package"), into one directory anywhere on
your hard disk (you should also be able to read it directly from a
diskette but it will be noticeably slower.) Then, from File Manager
within Windows, locate the WinHelp file ('for2c.hlp') and click on it.
The Windows Help file viewer, 'winhelp.exe', will automatically be
executed and the electronic book will be displayed. Enjoy!
*****************************************************************************
2) For a more permanent installation with a convenient icon, it is advisable
to first create a special directory on your hard disk and copy all the
files into that directory. If you acquire more books from OmniMedia in
the future and copy their files into the same special directory, you will
save on disk space since several files are shared in common by all of
OmniMedia's electronic books (for example, the DLL files.) As an example,
which will be used for the explanation below, this directory path could be
named C:\WINDOWS\BOOKS .
(Special note: As mentioned in the section "Files That Must Be Included
in the Distribution Package," you may already have 'vbrun300.dll' on your
system. If so, then you need not duplicate it in your special electronic
book directory as it does use an appreciable amount of disk space. The
current version of 'vbrun300.dll' provided with this electronic book is
dated 05-12-93. If you happen to have an older version of 'vbrun300.dll',
you can safely replace it with the one provided with this electronic book.)
The next step is to either select or create the program group into which
you will place the title FORTRAN TO C (or whatever you want to call it --
it need not be in caps.) If you don't already have a special program
group for electronic books, you need to create one. To create a new
program group which could be called, for example, OMNIMEDIA BOOKS (it need
not be all in caps), simply go to the FILE menu of your Program Manager,
select NEW , PROGRAM GROUP , OK , and then in the box labeled DESCRIPTION,
enter the string OMNIMEDIA BOOKS (or whatever else you want to call the
program group), then press OK (leave the GROUP FILE box empty.)
Once the program group, whether old or new, is selected, then from Program
Manager select FILE , NEW , PROGRAM ITEM , OK . At this point, you have
three text boxes to fill. For the DESCRIPTION box enter FORTRAN TO C (or
whatever else you want the application icon to be called -- it need not be
in caps); for the COMMAND LINE box enter
C:\WINDOWS\WINHELP.EXE FOR2C.HLP ; for the WORKING DIRECTORY box enter
C:\WINDOWS\BOOKS . Then to select the icon, click on CHANGE ICON and
attach the file BOOK.ICO from the directory C:\WINDOWS\BOOKS to this
application using BROWSE to locate it. Then, click OK twice to finish.
Now, your selected program group should contain an icon of a book with the
name FORTRAN TO C underneath it. Just click on the book icon whenever
you want to read it! Enjoy!
-------------------------------------------------------------
11. How to Use This Electronic Book and Some Useful Features
-------------------------------------------------------------
Using the WinHelp viewer is intuitive and very easy. Once you are viewing
this electronic book on your computer, you can learn much of what you need to
know by simply experimenting with the toolbar buttons, menu commands, etc.
If you do need more help in reading and using this electronic book, refer to
"How to Use Help" which can be selected from the "Help" menu item found near
the top of the window when viewing this electronic book.
Some useful features of this electronic book include
1) Bookmark -- You can place one or more bookmarks at any location so you
can later return to that location, even after exiting this
book. The Bookmark feature is found in the menu.
2) Annotate -- You can add notes and comments to any topic displayed in a
window (excepting temporary pop-up windows.) The Annotate
feature is found in the menu under 'Edit'.
3) Full Text Search -- You can do a word/string search of the text. Very
powerful at locating that hard-to-find text or
subject. This feature is found in the toolbar as
button 'FTSrch'.
4) Topic Copy -- You can copy the entire text of a topic to the Windows
Clipboard, and from there it can be pasted into most
Windows-based word or text processors. This feature is
done by holding down the 'Ctrl' button and pushing the
'Insert' button, i.e., 'Ctrl-Insert'.
5) Hypertext -- Hypertext is nothing mystical. It is simply text which has
been linked to text elsewhere in the electronic book.
Clicking on hypertext will move you to the text the hypertext
is linked with. In this electronic book, much effort has
been made to make it clear which text is hypertext. To
verify if a word or phrase is hypertext, the mouse pointer
will switch from an arrow to a small hand with a pointing
finger when placed on top of hypertext.
One note about scrolling should be mentioned for those newcomers who are
totally unfamiliar with the purpose and use of scroll bars. You may notice
in this electronic book that for most windows (i.e., topics), there is a
scrollbar at the right-hand-side (and sometimes at the bottom) of the viewing
window. The scroll bar is there because the text of the topic is too long or
too big to fit completely within the visible window. By clicking your mouse
on various parts of the scroll bar, you can move ("scroll") either up or down
in the text. Specifically, clicking on either the up or down arrows (which
are found at the top and bottom respectively of the scroll bar), will move
you either one line up or one line down in the text. You can also scroll a
full window or page if you click anywhere in the scroll bar between the up or
down arrows and the slider (the slider is the plain rectangular "button" that
slides in the scroll bar, and indicates where the viewing window is
positioned with respect to the topic text.)
Another note concerns the aspect of font size. If you are using VGA
(640x480) resolution, you may find the font size to be quite large,
especially on bigger monitors. One solution is to maximize the window size,
done by clicking on the upper right-hand button, and read the window from
further away -- maximizing the window size (to fill the whole screen) will
also make the electronic book look better at the 640x480 resolution with
respect to the number of characters per line being similar to a typical book.
(One of the reasons why this larger font was selected was to insure that this
electronic book would be easily readable on laptop/notebook-sized screens --
WinHelp unfortunately does not yet allow variable font sizes depending on the
video parameters, though OmniMedia is working hard with programmers to be
able to do this.) If you still feel the characters are too large for your
taste, consider going to a higher screen resolution if you can (since that
will tend to decrease the font size.) You might even want to consider
testing the large/small font options for the higher resolutions if available
to you for your particular video card.
-------------------------------------
12. Copyright Notice and Other Terms
-------------------------------------
(The following notice also appears within this electronic book.)
This electronic book, "From Fortran to C" (the "TITLE") is (C) Copyright 1995
by James F. Kerrigan (the "Author"), and is fully protected by United States
Copyright laws and international treaty provisions. This TITLE was produced/
published by OmniMedia (the "Publisher".)
Because this electronic book is protected by SoftLock (TM) software, the
Author hereby gives all others permission to electronically duplicate and
redistribute this TITLE provided that none of the files associated with the
TITLE are omitted and/or altered in any manner (for a complete list of files,
see the section "Files That Must Be Included in the Distribution Package.")
Some examples of forbidden alterations to this TITLE include the disabling of
the SoftLock feature via any means, the distribution of an electronic file
produced by capturing or extracting any portion of the text, and distributing
to others a printed copy of any portion of the text.
The Author and the Publisher encourage you to distribute this electronic book
far and wide (as outlined in the previous paragraph) so that many others can
enjoy it.
This TITLE, including all files, installation programs, and documentation,
is provided "AS IS", that is, you use this title at your own risk, without
warranty of any kind. This includes, but is not limited to, defects/errors
with the format of this TITLE as well as defects/errors in the media used to
distribute this TITLE to the supplier and/or purchaser. The Author and the
Publisher further disclaims all implied warranties including, but not limited
to, merchantability or fitness for a particular purpose.
In no event shall the Author, the Publisher, SoftLock Services, Inc., or any
suppliers of this TITLE be liable for any damages whatsoever (including,
without limitation, damages for lost profits, business interruptions, loss of
business information, or any other pecuniary loss) arising from the use of or
inability to use the TITLE, even if the Author, the Publisher, SoftLock,
and/or the suppliers of this TITLE have been advised of the possibility of
such damages. Because some jurisdictions do not allow exclusions or
limitations of liability for consequential or incidental damages, this
limitation may not apply to you.
---------------------------------
13. How to Contact the Publisher
---------------------------------
OmniMedia is devoted to producing only the highest quality electronic books.
For more information or advice about this electronic book or other offerings
from OmniMedia, contact
OmniMedia
c/o Jon E. Noring
1312 Carlton Place
Livermore, CA 94550
(510) 294-8153
(510) 447-1771 (fax -- not always online)
Internet: omnimdia@netcom.com
OmniMedia's anonymous ftp archive is located at
ftp.netcom.com /pub/Om/OmniMedia/books
For WWW (Web) users, the URL address to the archive is
ftp://ftp.netcom.com/pub/Om/OmniMedia/books
---------------------------
14. Refund/Warranty Policy
---------------------------
Sorry, all sales are final. The "try before you buy" feature of SoftLock
should help you decide whether or not to purchase the password necessary to
read all portions of this electronic book. Contact OmniMedia if you have
any difficulties either before or after purchasing a password. We want you
to be satisfied!
And lastly...ENJOY!
-----------------------------------------------------------------------------
Windows and Windows NT are registered trademarks of the Microsoft Corporation
OS/2 is a registered trademark of IBM
SoftLock is a trademark of SoftLock Services, Inc.
-----------------------------------------------------------------------------